// import React, { FC } from 'react'
// import { Route, Redirect } from 'react-router-dom'
// import { useSelector } from 'react-redux'
// import { RootState } from '@/redux/reducer'
// import { LoginState } from '@/redux/reducer/loginReducer'

export interface PrivateRouteProps {
  component: Function

  [key: string]: any
}

// const PrivateRoute: FC<PrivateRouteProps> = ({ component: Component, ...rest }) => {
//   const user = useSelector<RootState, LoginState>(state => state.login)
//   const { isLogin } = user
//   const renderComponent = (props: any) => (
//     isLogin ?
//       <Component {...props} />
//       :
//       <Redirect to={{ pathname: '/', state: { from: props.location.pathname } }}/>
//   )
//   return (
//     <Route
//       {...rest}
//       render={renderComponent}
//     />
//   )
// }

export default {}
